import tensorflow as tf

dataset = tf.data.Dataset.range(8)
dataset = dataset.batch(2)
for element in dataset:
    print(element)
